package com.sys.orders.pojo;


import java.util.Date;
import java.util.Map;
import java.util.TreeMap;

import com.sys.common.pojo.BasePojo;
import com.sys.goods.pojo.AGoods;

/**
 * 发货明细表
 * 
 * @author lby
 *
 */
public class AOrdersDeliver extends BasePojo<AOrdersDeliver>
{
	private int deliveryDetailsId;
	private int orderDetailsId;
	private int blindBoxId;
	private int purchaseQuantity;
	private byte status;
	private Date createTime;
	private Date updateTime;
	private Date pubTime;

	private String statusStr;
	private AGoods goods ; 

	/*
	 * 方便枚举项在网页上显示出来 键为值(数字), 值为字符串描述 只提供get方法
	 */
	private Map<String, String> enumsMap = new TreeMap<String, String>();

	public Map<String, String> getEnumsMap()
	{
		// 根据状态值获取字符串描述
		AOrdersDeliverEnum[] aordersdeliverenum = AOrdersDeliverEnum.values();
		for (int i = 0; i < aordersdeliverenum.length; i++)
		{
			AOrdersDeliverEnum aordersdeliverEnum = aordersdeliverenum[i];
			String key = aordersdeliverEnum.toString();
			enumsMap.put(key + "-" + aordersdeliverEnum.getStatus() + "", aordersdeliverEnum.getName());
		}
		return enumsMap;
	}

	public String getStatusStr()
	{
		AOrdersDeliverEnum[] values = AOrdersDeliverEnum.values();
		for (int i = 0; i < values.length; i++)
		{
			AOrdersDeliverEnum aordersdeliverEnumTemp = values[i];
			if (aordersdeliverEnumTemp.toString().startsWith("STATUS"))
			{
				if (aordersdeliverEnumTemp.getStatus() == this.status)
				{
					this.statusStr = aordersdeliverEnumTemp.getName();
				}
			}
		}

		return statusStr;
	}

	public int getDeliveryDetailsId()
	{
		return deliveryDetailsId;
	}

	public void setDeliveryDetailsId(int deliveryDetailsId)
	{
		this.deliveryDetailsId = deliveryDetailsId;
	}

	public int getOrderDetailsId()
	{
		return orderDetailsId;
	}

	public void setOrderDetailsId(int orderDetailsId)
	{
		this.orderDetailsId = orderDetailsId;
	}

	public int getBlindBoxId()
	{
		return blindBoxId;
	}

	public void setBlindBoxId(int blindBoxId)
	{
		this.blindBoxId = blindBoxId;
	}

	public int getPurchaseQuantity()
	{
		return purchaseQuantity;
	}

	public void setPurchaseQuantity(int purchaseQuantity)
	{
		this.purchaseQuantity = purchaseQuantity;
	}

	public byte getStatus()
	{
		return status;
	}

	public void setStatus(byte status)
	{
		this.status = status;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

	public Date getPubTime()
	{
		return pubTime;
	}

	public void setPubTime(Date pubTime)
	{
		this.pubTime = pubTime;
	}

	public AGoods getGoods() {
		return goods;
	}

	public void setGoods(AGoods goods) {
		this.goods = goods;
	}

}
